package com.horatio.scenario.basic;
/**
 * 普通节点
 * @author hongxiao.z
 * @date   2014-3-10  下午7:17:59
 */
public class CommonNode extends GeoNode 
{
	//父节点
	private CommonNode _parentNode;
	
	public CommonNode(int x, int y, CommonNode parentNode) 
	{
		super(x, y);
		this._parentNode = parentNode;
	}
	
	private CommonNode(int x, int y) 
	{
		super(x, y);
	}

	public GeoNode get_parentNode() {
		return _parentNode;
	}

	public void set_parentNode(CommonNode _parentNode) {
		this._parentNode = _parentNode;
	}
	
	@Override
	public int hashCode()
	{
		return _x << 32 + _y << 1 + 1;
	}
	
	@Override
	public boolean equals(Object obj)
	{
		if (this == obj) return true;
		
		if (obj == null) return false; 
		
		if (!(obj instanceof GeoNode)) return false;
		
		final GeoNode other = (GeoNode) obj;
		
		return other._x == this._x && other._y == this._y;
	}
}
